package com.zzxy.spring5;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;

public class MyBeanPostProcessor implements BeanPostProcessor {

    public  Object postProcessBeforeInitialzation(Object obj, String s) throws BeanException {
        System.out.println("5.before post processor");
        return obj;
    }
    public  Object postProcessAfterInitialzation(Object o, String s) throws BeanException {
        System.out.println("8.after post processor");
        return o;
    }

    @Override
    public Object postProcessBeforeInitialization(Object o, String s) throws BeansException {
        return null;
    }

    @Override
    public Object postProcessAfterInitialization(Object o, String s) throws BeansException {
        return null;
    }

    private class BeanException extends Exception {
    }
}


